import { Scene } from 'scenes/sceneTypes'
import { preloadedScenes } from 'scenes/scenes'

import { productScenes } from '~/products'

export const appScenes: Record<Scene | string, () => any> = {
    ...productScenes,
    [Scene.AdvancedActivityLogs]: () => import('./audit-logs/AdvancedActivityLogsScene'),
    [Scene.AsyncMigrations]: () => import('./instance/AsyncMigrations/AsyncMigrations'),
    [Scene.BatchExportNew]: () => import('./data-pipelines/batch-exports/BatchExportScene'),
    [Scene.BatchExport]: () => import('./data-pipelines/batch-exports/BatchExportScene'),
    [Scene.BillingAuthorizationStatus]: () => import('./billing/AuthorizationStatus'),
    [Scene.BillingSection]: () => import('./billing/BillingSection'),
    [Scene.Billing]: () => import('./billing/Billing'),
    [Scene.Canvas]: () => import('./notebooks/NotebookCanvasScene'),
    [Scene.CLIAuthorize]: () => import('./authentication/CLIAuthorize'),
    [Scene.Cohort]: () => import('./cohorts/Cohort'),
    [Scene.CohortCalculationHistory]: () => import('./cohorts/CohortCalculationHistory'),
    [Scene.Cohorts]: () => import('./cohorts/Cohorts'),
    [Scene.CustomCss]: () => import('./themes/CustomCssScene'),
    [Scene.Dashboard]: () => import('./dashboard/Dashboard'),
    [Scene.Dashboards]: () => import('./dashboard/dashboards/Dashboards'),
    [Scene.DataManagement]: () => import('./data-management/DataManagementScene'),
    [Scene.DataPipelinesNew]: () => import('./data-pipelines/DataPipelinesNewScene'),
    [Scene.DataPipelines]: () => import('./data-pipelines/DataPipelinesScene'),
    [Scene.DataWarehouseSourceNew]: () => import('./data-warehouse/new/NewSourceWizard'),
    [Scene.DataWarehouseSource]: () => import('./data-warehouse/settings/DataWarehouseSourceScene'),
    [Scene.DataWarehouse]: () => import('./data-warehouse/DataWarehouseScene'),
    [Scene.DeadLetterQueue]: () => import('./instance/DeadLetterQueue/DeadLetterQueue'),
    [Scene.DebugHog]: () => import('./debug/hog/HogRepl'),
    [Scene.DebugQuery]: () => import('./debug/DebugScene'),
    [Scene.Error404]: () => ({ default: preloadedScenes[Scene.Error404].component }),
    [Scene.ErrorNetwork]: () => ({ default: preloadedScenes[Scene.ErrorNetwork].component }),
    [Scene.ErrorProjectUnavailable]: () => ({ default: preloadedScenes[Scene.ErrorProjectUnavailable].component }),
    [Scene.EventDefinitionEdit]: () => import('./data-management/definition/DefinitionEdit'),
    [Scene.EventDefinition]: () => import('./data-management/definition/DefinitionView'),
    [Scene.Experiment]: () => import('./experiments/Experiment'),
    [Scene.ExperimentsSharedMetric]: () => import('./experiments/SharedMetrics/SharedMetric'),
    [Scene.ExperimentsSharedMetrics]: () => import('./experiments/SharedMetrics/SharedMetrics'),
    [Scene.Experiments]: () => import('./experiments/Experiments'),
    [Scene.ExploreEvents]: () => import('./activity/explore/EventsScene'),
    [Scene.ExploreSessions]: () => import('./activity/explore/SessionsScene'),
    [Scene.FeatureFlag]: () => import('./feature-flags/FeatureFlag'),
    [Scene.FeatureFlags]: () => import('./feature-flags/FeatureFlags'),
    [Scene.Feed]: () => import('./feed/Feed'),
    [Scene.Group]: () => import('./groups/Group'),
    [Scene.GroupsNew]: () => import('./groups/GroupsNew'),
    [Scene.Groups]: () => import('./groups/Groups'),
    [Scene.Heatmaps]: () => import('./heatmaps/scenes/heatmaps/HeatmapsScene'),
    [Scene.HeatmapNew]: () => import('./heatmaps/scenes/heatmap/HeatmapNewScene'),
    [Scene.HeatmapRecording]: () => import('./heatmaps/scenes/heatmap/HeatmapRecordingScene'),
    [Scene.Heatmap]: () => import('./heatmaps/scenes/heatmap/HeatmapScene'),
    [Scene.HogFunction]: () => import('./hog-functions/HogFunctionScene'),
    [Scene.Insight]: () => import('./insights/InsightScene'),
    [Scene.IntegrationsRedirect]: () => import('./IntegrationsRedirect/IntegrationsRedirect'),
    [Scene.InviteSignup]: () => import('./authentication/InviteSignup'),
    [Scene.LegacyPlugin]: () => import('./data-pipelines/legacy-plugins/LegacyPluginScene'),
    [Scene.Coupons]: () => import('./coupons/Coupons'),
    [Scene.LiveEvents]: () => import('./activity/live/LiveEventsTable'),
    [Scene.Login2FA]: () => import('./authentication/Login2FA'),
    [Scene.EmailMFAVerify]: () => import('./authentication/EmailMFAVerify'),
    [Scene.Login]: () => import('./authentication/Login'),
    [Scene.MarketingAnalytics]: () => import('./marketing-analytics/MarketingAnalyticsScene'),
    [Scene.Max]: () => import('./max/Max'),
    [Scene.MoveToPostHogCloud]: () => import('./moveToPostHogCloud/MoveToPostHogCloud'),
    [Scene.NewTab]: () => import('./new-tab/NewTabScene'),
    [Scene.Notebook]: () => import('./notebooks/NotebookScene'),
    [Scene.Notebooks]: () => import('./notebooks/NotebooksScene'),
    [Scene.OAuthAuthorize]: () => import('./oauth/OAuthAuthorize'),
    [Scene.Onboarding]: () => import('./onboarding/Onboarding'),
    [Scene.OnboardingCoupon]: () => import('./onboarding/coupon/OnboardingCouponRedemption'),
    [Scene.OrganizationCreateFirst]: () => import('./organization/Create'),
    [Scene.OrganizationCreationConfirm]: () => import('./organization/ConfirmOrganization/ConfirmOrganization'),
    [Scene.PasswordResetComplete]: () => import('./authentication/PasswordResetComplete'),
    [Scene.PasswordReset]: () => import('./authentication/PasswordReset'),
    [Scene.Person]: () => import('./persons/PersonScene'),
    [Scene.Persons]: () => import('./persons/PersonsScene'),
    [Scene.PreflightCheck]: () => import('./PreflightCheck/PreflightCheck'),
    [Scene.Products]: () => import('./products/Products'),
    [Scene.UseCaseSelection]: () => import('./onboarding/useCaseSelection/UseCaseSelection'),
    [Scene.ProjectCreateFirst]: () => import('./project/Create'),
    [Scene.ProjectHomepage]: () => import('./project-homepage/ProjectHomepage'),
    [Scene.PropertyDefinitionEdit]: () => import('./data-management/definition/DefinitionEdit'),
    [Scene.PropertyDefinition]: () => import('./data-management/definition/DefinitionView'),
    [Scene.ReplayFilePlayback]: () => import('./session-recordings/file-playback/SessionRecordingFilePlaybackScene'),
    [Scene.ReplayPlaylist]: () => import('./session-recordings/playlist/SessionRecordingsPlaylistScene'),
    [Scene.ReplaySettings]: () => import('./session-recordings/settings/SessionRecordingsSettingsScene'),
    [Scene.ReplaySingle]: () => import('./session-recordings/detail/SessionRecordingDetail'),
    [Scene.Replay]: () => import('./session-recordings/SessionRecordings'),
    [Scene.RevenueAnalytics]: () => import('products/revenue_analytics/frontend/RevenueAnalyticsScene'),
    [Scene.SQLEditor]: () => import('./data-warehouse/editor/EditorScene'),
    [Scene.SavedInsights]: () => import('./saved-insights/SavedInsights'),
    [Scene.SessionAttributionExplorer]: () =>
        import('scenes/web-analytics/SessionAttributionExplorer/SessionAttributionExplorerScene'),
    [Scene.SessionProfile]: () => import('./sessions/SessionProfileScene'),
    [Scene.Settings]: () => import('./settings/SettingsScene'),
    [Scene.Signup]: () => import('./authentication/signup/SignupContainer'),
    [Scene.Site]: () => import('./sites/Site'),
    [Scene.StartupProgram]: () => import('./startups/StartupProgram'),
    [Scene.SurveyTemplates]: () => import('./surveys/SurveyTemplates'),
    [Scene.Survey]: () => import('./surveys/Survey'),
    [Scene.Surveys]: () => import('./surveys/Surveys'),
    [Scene.SystemStatus]: () => import('./instance/SystemStatus'),
    [Scene.ToolbarLaunch]: () => import('./toolbar-launch/ToolbarLaunch'),
    [Scene.Unsubscribe]: () => import('./Unsubscribe/Unsubscribe'),
    [Scene.VerifyEmail]: () => import('./authentication/signup/verify-email/VerifyEmail'),
    [Scene.WebAnalyticsMarketing]: () => import('./web-analytics/WebAnalyticsScene'),
    [Scene.WebAnalyticsWebVitals]: () => import('./web-analytics/WebAnalyticsScene'),
    [Scene.WebAnalyticsHealth]: () => import('./web-analytics/WebAnalyticsScene'),
    [Scene.WebAnalytics]: () => import('./web-analytics/WebAnalyticsScene'),
    [Scene.Wizard]: () => import('./wizard/Wizard'),
}
